#include "StomperLib/EditorCamera.h"
namespace StomperLib
{
EditorCamera::EditorCamera( )
{
  this->m_Translation = StompedReality::Math::Vector2( 0, 0 );
}

EditorCamera::~EditorCamera( )
{
}

void EditorCamera::Reset( )
{
  this->m_Translation = StompedReality::Math::Vector2( 0, 0 );
}

void EditorCamera::Reset( const StompedReality::Math::Vector2 translation )
{
  this->m_Translation = translation;
}

void EditorCamera::Reset( const float x, const float y )
{
  this->Reset( StompedReality::Math::Vector2( x, y ));
}

const StompedReality::Math::Vector2 EditorCamera::GetTranslation( )
{
  return this->m_Translation;
}

void EditorCamera::Translate( const StompedReality::Math::Vector2 translation )
{
  this->m_Translation += translation;
}

void EditorCamera::Translate( const float x, const float y )
{
  this->Translate( StompedReality::Math::Vector2( x, y ));
}

StompedReality::Math::Vector2 EditorCamera::TranslateToCameraSpace( StompedReality::Math::Vector2 position )
{
  return position - this->m_Translation;
}

StompedReality::Math::Vector2 EditorCamera::TranslateToScreenSpace( StompedReality::Math::Vector2 position )
{
  return position + this->m_Translation;
}

}